package design_7_bridge.demo1;

import design_7_bridge.demo1.bridge.impl.AsynMsg;
import design_7_bridge.demo1.service.impl.SmsMsgServiceImpl;

public class MsgBridgePatternDemo {
	public static void main(String[] args) {

		String msgData = "电话:17600001234,内容:测试内容";
		// 延时发送短信
		new AsynMsg(msgData, new SmsMsgServiceImpl()).sendMsg();
		// 立即发送短信
		//new InstantMsg(msgData, new SmsMsgServiceImpl()).sendMsg();

		msgData = "邮箱:1720696548@qq.com,内容:测试内容";
		// 延时发送邮件
		new AsynMsg(msgData, new SmsMsgServiceImpl()).sendMsg();
		// 立即发送邮件
		//new InstantMsg(msgData, new SmsMsgServiceImpl()).sendMsg();
	}
}